﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace AutoUpdate
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(String[] agr)
        {
            Application.EnableVisualStyles();
            Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);

            Application.SetCompatibleTextRenderingDefault(false);
            if (agr.Length > 0)
                Application.Run(new FormMain(agr[0]));
            else
                MessageBox.Show("Bạn không thể tự khởi chạy chương trình này.");
        }
        static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
        {
            MessageBox.Show("Lỗi. Chi tiết lỗi: " + e.Exception.Message + "\r\n" + e.Exception.StackTrace);
        }

    }
}
